﻿@using System.Data;
@using FileServer.Common;
@using UtilsBase;
@{
    ViewBag.PageTitle = "洪峰智能";

    Layout = "~/Views/Shared/PageTemplate.cshtml";
}

<script>
    $(document).ready(function () {



    });
    function saveModel() {
        var data = $("#addForm").serializeArray(); //自动将form表单封装成json
        $.post("saveModel", data, function (result) {
            var jsonresult = (result);

            if (jsonresult.respCode == "200") {
               // $("#result").text("操作完成");
                //  window.location.href = "list";
                // window.history.back();
                alert("保存成功");
            }
            else {
                alert(jsonresult.respMsg);
                return;
            }
        });

    }
</script>

<style>
    #pagelist_follow {
        width: 100%;
    }

    #pagelist_main {
        width: 100%;
    }

    .kv-item label {
        width: 150px;
    }
</style>
<div id="saper-container">
    <form id="addForm" name="addForm" action="list" method="post">
        <input type="hidden" name="pm_guid" id="pm_guid" value="@ViewBag.pm_guid" />
        <input type="hidden" name="p_guid" id="p_guid" value="@ViewBag.p_guid" />
        <div id="saper-hd"></div>
        <div id="saper-bd">
            <div class="subfiled clearfix">
                <h2>生成型号模版</h2>
            </div>
            <div class="subfiled-content">

                <div id="" title="添加/编辑">
                    <form action="" name="addForm" id="addForm" method="post">
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>样板产品编号：</label>
                            <div class="kv-item-content">
                                <label id="gw_code" style="text-align:left">@(ViewBag.p_code)</label>
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>样板产品名称：</label>
                            <div class="kv-item-content">
                                <label id="gw_code" style="text-align:left">@(ViewBag.p_name)</label>
                            </div>
                        </div>
                        <div class="kv-item clearfix">
                            <label><span class="impInfo">*</span>型号名称：</label>
                            <div class="kv-item-content">
                                <input type="text" name="pm_name" id="pm_name" placeholder="型号名称" value="@(ViewBag.pm_name)" />
                            </div>
                        </div>
                       

                        <div><hr /></div>
                        <div style="margin:0 auto;width:150px;">

                            <input type="button" id="save" name="save" value="保存" onclick="javascript:saveModel()" />
                            &nbsp;&nbsp; <input type="button" id="but_back1" name="but_back1" value="返回" onclick="javascript:window.location.href='@ViewBag.from'" />
                        </div>


                      
                    </form>
                </div>
            </div>
        </div>
        <div id="saper-ft"></div>
    </form>
</div>

